| Conditions | 2 |
| Total Lines | 8 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { QueryHandler } from '@nestjs/cqrs'; |
||
| 14 | |||
| 15 | public async execute(query: GetCooperativeQuery): Promise<CooperativeView> { |
||
| 16 | const cooperative = await this.cooperativeRepository.find(); |
||
| 17 | if (!cooperative) { |
||
| 18 | throw new CooperativeNotFoundException(); |
||
| 19 | } |
||
| 20 | |||
| 21 | return new CooperativeView(cooperative.getDayDuration()); |
||
| 22 | } |
||
| 24 |